/* list的merge */
/*2 2 3 3 4 4 7 8 8 10 34*/
#include <iostream>
#include <list>
using namespace std;


int main(int argc, char **argv)
{
    list<int>::iterator it;
    list<int> l1 {8,3,4,3,8,2};
    list<int> l2 {10,2,34,7,4};

    l1.sort();
    l2.sort();

    
    l1.merge(l2);

    it = l1.begin();

    for (; it != l1.end(); it++)
    {
        cout << *it << " ";
    } /* end of for (; it != l1.end(); it++) */
    cout << endl;


    return 0;
}